package www.wen.com.common.lib.data.entities


import androidx.annotation.Keep
import com.contrarywind.interfaces.IPickerViewData

@Keep
data class CityEntity(
    val content: List<Content>,
    val empty: Boolean, // false
    val first: Boolean, // true
    val last: Boolean, // false
    val number: Int, // 0
    val numberOfElements: Int, // 20
    val pageable: Pageable,
    val size: Int, // 20
    val sort: Sort,
    val totalElements: Int, // 34
    val totalPages: Int // 2
) {
    @Keep
    data class Content(
        val childArea: List<Content>,
        val code: String, // 110000
        val createTime: String, // 2019-02-28T17:16:58.000+0800
        val id: Int, // 2
        val name: String, // 北京
        val parentCode: String, // 100000
        val sort: Int, // 1
        val updateTime: String // 2019-02-28T17:17:05.000+0800
    ): IPickerViewData {

        override fun getPickerViewText(): String = name
    }

    @Keep
    data class Pageable(
        val offset: Int, // 0
        val pageNumber: Int, // 0
        val pageSize: Int, // 20
        val paged: Boolean, // true
        val sort: Sort,
        val unpaged: Boolean // false
    ) {
        @Keep
        data class Sort(
            val empty: Boolean, // true
            val sorted: Boolean, // false
            val unsorted: Boolean // true
        )
    }

    @Keep
    data class Sort(
        val empty: Boolean, // true
        val sorted: Boolean, // false
        val unsorted: Boolean // true
    )
}